<template>
  <div class="xfn-main-header">
      <h3 class="xfn-title" >{{$store.state.globalSettings.appName}}管理平台</h3>
      <div class="xfn-right">
        当前用户:{{$store.state.adminName}}
        <el-button size="mini" @click="out">退出</el-button>
      </div>
  </div>  
</template>


<style lang="scss">
  $header-height:60px;
  .xfn-main-header{
    height:$header-height; 
    padding:0 6px !important;
    line-height: $header-height; 
    border-radius: 4px; 
    background: #dcdfe6;
    .xfn-title{color:#303133;float: left;margin:0;}
    .xfn-right{float: right;}
  }
</style>

<script>
export default {
  data(){
    return{

    }
  },
  methods:{
    out(){
      //清除登录信息
      this.$store.commit('setAdminname',"");
      this.$router.push('/login');
    }
  }
}
</script>